namespace YXShop.ExcelLite
{
    using System;

    public class HorizontalPageBreak : PageBreak
    {
        internal HorizontalPageBreak(int row, int firstColumn, int lastColumn) : base(row, firstColumn, lastColumn)
        {
        }

        internal bool FixRowIndexes(int rowIndex, int offset)
        {
            if (base.breakIndex >= rowIndex)
            {
                base.breakIndex += offset;
                if (base.breakIndex < rowIndex)
                {
                    return false;
                }
            }
            return true;
        }

        public int FirstColumn
        {
            get
            {
                return base.firstLimit;
            }
            set
            {
                base.firstLimit = value;
            }
        }

        public int LastColumn
        {
            get
            {
                return base.lastLimit;
            }
            set
            {
                base.lastLimit = value;
            }
        }

        public int Row
        {
            get
            {
                return base.breakIndex;
            }
            set
            {
                base.breakIndex = value;
            }
        }
    }
}

